package com.tanguy.user.ui.trip.activity.adapter

import android.view.View
import com.tanguy.user.R
import com.tanguy.user.base.ImageViewTang
import com.tanguy.user.base.JustAdapter
import com.tanguy.user.bean.station.CarBean
import com.tanguy.user.utlis.extend.setText
import org.jetbrains.anko.find

/**
 * Created by dab on 2017/10/24 0024 18:05
 */
class CarTypeAdapter(data: ArrayList<CarBean>) : JustAdapter<CarBean>(data, R.layout.item_car_type) {
    override fun bind(itemView: View, data: CarBean, position: Int) {
        itemView.apply {
            find<ImageViewTang>(R.id.iv_icon).setImageURI(data.img)
            setText(R.id.tv_name, data.name)
        }

    }


    override fun getNotDataLayout(): Int=R.layout.item_car_type
}